#include "World.h"
#include "GameObject.h"
#include "System.h"


World::World(void)
{
}


World::~World(void)
{
}

void World::insert(GameObject* obj)
{
	_listObject.push_back(obj);
}

void World::insert(System* sys)
{
	_listSystem.push_back(sys);
}

void World::update()
{
	for (GameObject* obj : _listObject)
	{
		obj->update();
	}
	for (System* sys : _listSystem)
	{
		sys->update();
	}
}


void World::render()
{
	for (GameObject* obj : _listObject)
	{
		obj->render();
	}
	for (System* sys : _listSystem)
	{
		sys->render();
	}
}
